package nnfe.userCenter.jpa;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;
import nnfe.userCenter.model.${toClassName};
<#--<#if hasCompositePk&&primeType!=toClassName>import com.bluemobi.ssm.model.${toClassName}Id;</#if>-->

/**
 * @author: DGG-XAM3C create on ${.now}
 * @Description: ${toClassName}数据查询接口
 */
@Transactional
public interface ${toClassName}Repository extends CrudRepository<${toClassName}, String> {

    //分页查询
    Page<${toClassName}> findAll(Pageable pageRequest);

    //使用sql语句查询
    @Query(value = "select * FROM ${name} WHERE id = ?1", nativeQuery = true)
    ${toClassName} sqlQuery(String id);

}
